package com.lhkj.ct.meta.modules.scheduling.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lhkj.ct.base.model.dto.PageQuery;
import com.lhkj.ct.base.mybatis.extension.service.IPageService;
import com.lhkj.ct.base.mybatis.extension.service.IService;
import com.lhkj.ct.meta.modules.scheduling.common.enums.AppointStatus;
import com.lhkj.ct.meta.modules.scheduling.model.entity.TblScheAppoint;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 预约记录表 服务类
 * </p>
 *
 * @author jobob
 * @since 2023-10-29
 */
public interface ScheAppointService extends IService<TblScheAppoint>, IPageService<TblScheAppoint> {

    /**
     * 预约记录
     */
    IPage<TblScheAppoint>  selectAppointPage(TblScheAppoint appoint, PageQuery pageQuery);

    /**
     * 用户预约记录
     */
    IPage<TblScheAppoint>  selectAppointPageByPatient(TblScheAppoint appoint, PageQuery pageQuery);

    /**
     * 后台修改状态
     */
    int updateState(@NotNull(message = "状态不能为NULL") AppointStatus status, @NotEmpty(message = "预约编号不能为空") String ...ids);

    /**
     * 用户签到
     */
    int userSign(@NotBlank(message = "预约编号不能为空") String id);

    /**
     * 用户取消预约
     */
    int userCancel(@NotBlank(message = "预约编号不能为空") String id);
}
